<script src="/vue.js"></script>

<div id="app">
    <div v-if="isShow" v-for="(item, index) in list" data-id="index">
        索引值：{{index}}, 内容：{{item}}
    </div>
    <button @click="isShow = !isShow">显/隐</button>
</div>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            isShow: true,
            list: [1, 2, 3, 4, 5, 6]
        }
    })
</script>

<style>

</style>